//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.mopub.mobileads;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.location.Location;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.webkit.WebViewDatabase;
import android.widget.FrameLayout;
import java.util.Map;
import java.util.TreeMap;

public class MoPubView extends FrameLayout {

    protected Object mCustomEventBannerAdapter;
    private Context mContext;
    private int mScreenVisibility;
    private BroadcastReceiver mScreenStateReceiver;
    private MoPubView.BannerAdListener mBannerAdListener;

    public MoPubView(Context context) {
        this(context, (AttributeSet) null);
    }

    public MoPubView(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.mContext = context;
        this.mScreenVisibility = this.getVisibility();
        this.setHorizontalScrollBarEnabled(false);
        this.setVerticalScrollBarEnabled(false);
        this.registerScreenStateBroadcastReceiver();
    }

    private void registerScreenStateBroadcastReceiver() {
        this.mScreenStateReceiver = new BroadcastReceiver() {
            public void onReceive(Context context, Intent intent) {
            }
        };
        IntentFilter filter = new IntentFilter("android.intent.action.SCREEN_OFF");
        filter.addAction("android.intent.action.USER_PRESENT");
        this.mContext.registerReceiver(this.mScreenStateReceiver, filter);
    }

    private void unregisterScreenStateBroadcastReceiver() {
        try {
            this.mContext.unregisterReceiver(this.mScreenStateReceiver);
        } catch (Exception var2) {
        }

    }

    public void loadAd() {
    }

    public void destroy() {
        this.unregisterScreenStateBroadcastReceiver();
        this.removeAllViews();
        if (this.mCustomEventBannerAdapter != null) {
            this.invalidateAdapter();
            this.mCustomEventBannerAdapter = null;
        }

    }

    private void invalidateAdapter() {
        if (this.mCustomEventBannerAdapter != null) {
        }

    }


    protected void adPresentedOverlay() {
        if (this.mBannerAdListener != null) {
            this.mBannerAdListener.onBannerExpanded(this);
        }

    }

    protected void adClosed() {
        if (this.mBannerAdListener != null) {
            this.mBannerAdListener.onBannerCollapsed(this);
        }

    }

    protected void adClicked() {
        if (this.mBannerAdListener != null) {
            this.mBannerAdListener.onBannerClicked(this);
        }

    }


    public void setAdUnitId(String adUnitId) {

    }

    public String getAdUnitId() {
        return null;
    }

    public void setKeywords(String keywords) {
    }

    public String getKeywords() {
        return null;
    }

    public void setLocation(Location location) {

    }

    public Location getLocation() {
        return null;
    }

    public int getAdWidth() {
        return 0;
    }

    public int getAdHeight() {
        return 0;
    }

    public Activity getActivity() {
        return (Activity) this.mContext;
    }

    public void setBannerAdListener(MoPubView.BannerAdListener listener) {
        this.mBannerAdListener = listener;
    }

    public MoPubView.BannerAdListener getBannerAdListener() {
        return this.mBannerAdListener;
    }

    public void setLocalExtras(Map<String, Object> localExtras) {

    }

    public Map<String, Object> getLocalExtras() {
        return (new TreeMap());
    }

    public void setAutorefreshEnabled(boolean enabled) {

    }

    public boolean getAutorefreshEnabled() {
        return false;
    }

    public void setAdContentView(View view) {

    }

    public void setTesting(boolean testing) {

    }

    public boolean getTesting() {
        return false;
    }

    public void forceRefresh() {
        if (this.mCustomEventBannerAdapter != null) {
            this.invalidateAdapter();
            this.mCustomEventBannerAdapter = null;
        }

    }

    /**
     * @deprecated
     */
    @Deprecated
    public void setTimeout(int milliseconds) {
    }

    /**
     * @deprecated
     */
    @Deprecated
    public String getResponseString() {
        return null;
    }

    /**
     * @deprecated
     */
    @Deprecated
    public String getClickTrackingUrl() {
        return null;
    }

    public static interface BannerAdListener {
        void onBannerLoaded(MoPubView var1);

        void onBannerFailed(MoPubView var1, MoPubErrorCode var2);

        void onBannerClicked(MoPubView var1);

        void onBannerExpanded(MoPubView var1);

        void onBannerCollapsed(MoPubView var1);
    }
}
